package com.zfzs.post.modules.transaction.service.mybatis.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zfzs.post.modules.transaction.domain.TransactionInfo;
import com.zfzs.post.modules.transaction.service.dto.SumTranByLevelDTO;
import com.zfzs.post.modules.transaction.service.dto.SumTranByTypeDTO;
import com.zfzs.post.modules.transaction.service.dto.TerAvgTransactionDTO;
import com.zfzs.post.modules.transaction.service.dto.TerSumTransactionDTO;
import com.zfzs.post.modules.transaction.service.mapper.mybatis.TransactionMapper;
import com.zfzs.post.modules.transaction.service.mybatis.IbatisTransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author wq
 * @date 2019/10/29 14:51
 * @description
 */
@Service
public class IbatisTransactionServiceImpl extends ServiceImpl<TransactionMapper,TransactionInfo> implements IbatisTransactionService {

    @Autowired
    private TransactionMapper transactionMapper;

    @Override
    public List<TerAvgTransactionDTO> findTerAvgTransaction(Map<String,Object> params){
        return transactionMapper.findTerAvgTransaction4Team(params);
    }

    @Override
    public List<TerSumTransactionDTO> findTerSumTransaction(Map<String, Object> params) {
        return transactionMapper.findTerSumTransaction(params);
    }

    @Override
    public List<SumTranByLevelDTO> findSumTranGroupByLevel(Map<String, Object> params) {
        return transactionMapper.findSumTranGroupByLevel( params);
    }

    @Override
    public List<SumTranByTypeDTO> findSumTranGroupByType(Map<String, Object> params) {
        return transactionMapper.findSumTranGroupByType(params);
    }

}
